<?php 
   $conn=mysql_connect("localhost","root","") or die("数据库服务器连接错误".mysql_error()); 
   mysql_select_db("database",$conn) or die("数据库访问错误".mysql_error());
   mysql_query("set character utf8");      
   mysql_query("set names utf8");
   error_reporting(0);  
?>
